import pool from "../../db/index.js"


export const delUser = async (req, res) => {
    if (!req.query.id) {
        res.send({
            status: 0,
            msg: '删除失败',
            data: []
        })
        return
    }
    try {
        let data = await pool.query("delete from  `user` where id =  " + req.query.id)
        console.log(data);
        res.send({
            status: 0,
            msg: '删除成功',
            data: []
        })
    } catch (e) {
        res.send({
            status: 0,
            msg: '删除失败',
            data: e
        })
    }
}